﻿<navigation:Page xmlns:my="clr-namespace:FileUploader.Controls"  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="FileUploader.UploaderPage" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="UploaderPage Page">
    <Grid x:Name="LayoutRoot"  Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" MinWidth="120"/>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" MinWidth="120"/>
        </Grid.ColumnDefinitions>

        <!--Controls are organized by column-->
        
        <!-- column 0 -->
        <sdk:Label Grid.Row="0" Grid.Column="0" Content="Local Files" FontWeight="Bold" FontSize="16" Margin="0,5,0,5" 
                   VerticalAlignment="Center" HorizontalAlignment="Center"/>
        <Grid Grid.Row="1" Grid.Column="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Grid.Column="0" Text="Path: " Margin="7,0,0,0" VerticalAlignment="Bottom" />
            <TextBox x:Name="LocalFileTextBox" IsEnabled="True"  Grid.Row="0" Margin="0,0,7,0" Grid.Column="1" />
        </Grid>
        <my:FileList x:Name="LocalFileList" Grid.Row="2" Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
        <StackPanel 
            Grid.Row="3" 
            Grid.Column="0" 
            Orientation="Horizontal" 
            HorizontalAlignment="Center" 
            VerticalAlignment="Center"
            Margin="0,0,0,7"
            >
            <Button x:Name="SendFileButton"
                    Content="Update Single File"
                    Margin="0,0,9,0"
                    Width="150" 
                    Visibility="Collapsed"
                    />
            <Button x:Name="SyncButton" 
                    Content="Update Directory" 
                    Margin="0,0,9,0"
                    Width="150"
                    VerticalAlignment="Center"
                    />
        </StackPanel>

        <!--column 1-->
        <sdk:GridSplitter Grid.Row="0" Grid.Column="1" Grid.RowSpan="4" VerticalAlignment="Stretch" HorizontalAlignment="Center" 
                          Background="DarkSlateGray" Width="3" />

        <!-- column 2 -->
        <TextBlock FontSize="16" FontWeight="Bold" Text="Remote Files on OSBLE" Grid.Row="0" Grid.Column="2" Margin="0,5,0,5" 
                   VerticalAlignment="Center" HorizontalAlignment="Center" />
        <ComboBox x:Name="UploadLocation" DisplayMemberPath="Value" Grid.Row="1" Grid.Column="2" Margin="7,0,7,0" />
        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="2" >
            <Button 
                x:Name="UpButton" 
                Content="UP" 
                HorizontalAlignment="Right" 
                VerticalAlignment="Center" 
                Margin="0,0,5,0" 
                Width="50"
                Visibility="Collapsed"
                    />
            <Button 
                x:Name="DownButton" 
                Content="DOWN" 
                HorizontalAlignment="Right" 
                VerticalAlignment="Center" 
                Width="50"
                Visibility="Collapsed"
                    />
        </StackPanel>
        <my:FileList x:Name="RemoteFileList" Grid.Row="2" Grid.Column="2" HorizontalAlignment="Stretch" />
        <StackPanel Grid.Row="3" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center">
            <Button x:Name="RemoveRemoteSelectionButton" Content="Delete Selection" Margin="0,0,9,0" Width="150" Visibility="Collapsed"/>
            <Button x:Name="DownloadRemoteFileButton" Content="Download Selected File" Width="150" Visibility="Collapsed" />
        </StackPanel>
        
    </Grid>
</navigation:Page>
